package com.zzjson.springboot.api.impl.protocol;

import org.apache.dubbo.common.compiler.Compiler;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.rpc.Protocol;

/**
 * <p>****************************************************************************</p>
 * <p><b>Copyright © 2010-2020 shuncom team All Rights Reserved<b></p>
 * <ul style="margin:15px;">
 * <li>Description : 测试自定义协议配置是否生效 </li>
 * <li>Version     : 1.0.0</li>
 * <li>Creation    : 2020年05月24日</li>
 * <li>@author     : zzy0_0</li>
 * </ul>
 * <p>****************************************************************************</p>
 */
public class ProtocolBootStrap {
	public static void main(String[] args) {
		Protocol myprotocol = ExtensionLoader.getExtensionLoader(Protocol.class).getExtension("myprotocol");
		int defaultPort = myprotocol.getDefaultPort();
		System.out.println("my custom protocol port is " + defaultPort);

		Compiler compiler = ExtensionLoader.getExtensionLoader(Compiler.class).getAdaptiveExtension();
		System.out.println(compiler);

	}

}